package com.itheima.day10.myParameter.test4;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class Demo {
    public static void main(String[] args) {
        // method1();
        // method2();
        // method3();
    }

    private static void method3() {
        Map<String, String> map = Map.of("张三", "湖南", "李四", "北京", "王五", "天津");
        System.out.println(map);

        Map<String, String> map2 = Map.ofEntries(
                Map.entry("张三", "湖南"),
                Map.entry("李四", "北京"),
                Map.entry("王五", "天津")
        );
        System.out.println(map2);
    }

    private static void method2() {
        Set<String> set = Set.of("a", "b", "c", "d");
        System.out.println(set);
    }

    private static void method1() {
        List<String> list = List.of("a", "b", "a", "b", "a", "b", "a", "b");
        //        //list.remove(5);

        ArrayList<String> liat1 = new ArrayList<>(list);
        System.out.println(liat1);
        System.out.println(liat1.size());
    }
}
